home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / programm / GNU_C++ / LIB / SRC / GEMLIB38.LZH / a_menu.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-10  |  3.6 KB  |  186 lines

  1. /*
  2.  *    Aes menu library interface
  3.  *
  4.  *    ++jrb    bammi@cadence.com
  5.  *    modified: mj -- ntomczak@vm.ucs.ualberta.ca
  6.  * modified: cf -- felsch@tu-harburg.de
  7.  */
  8. #include "gem.h"
  9.  
  10.  
  11. int menu_attach(int me_flag, OBJECT *me_tree, int me_item, MENU *me_mdata)
  12. {
  13.     aes_intin[0] = me_flag;
  14.     aes_intin[1] = me_item;
  15.     aes_addrin[0] = (long)me_tree;
  16.     aes_addrin[1] = (long)me_mdata;
  17.     aes_control[0] = 37;
  18.     aes_control[1] = 2;
  19.     aes_control[2] = 1;
  20.     aes_control[3] = 2;
  21.     aes_control[4] = 0;
  22.     aes(&aes_params);
  23.     return aes_intout[0];
  24. }
  25.  
  26.  
  27. int menu_bar(void *Tree, int ShowFlag)
  28. {
  29.     aes_intin[0] = ShowFlag;
  30.     aes_addrin[0] = (long)Tree;
  31.     aes_control[0] = 30;
  32.     aes_control[1] = 1;
  33.     aes_control[2] = 1;
  34.     aes_control[3] = 1;
  35.     aes_control[4] = 0;
  36.     aes(&aes_params);
  37.     return aes_intout[0];
  38. }
  39.  
  40.  
  41. int menu_click(int click, int setit)
  42. {
  43.     aes_intin[0] = click;
  44.     aes_intin[1] = setit;
  45.     aes_control[0] = 37;
  46.     aes_control[1] = 2;
  47.     aes_control[2] = 1;
  48.     aes_control[3] = 0;
  49.     aes_control[4] = 0;
  50.     aes(&aes_params);
  51.     return aes_intout[0];
  52.  
  53.  
  54. int menu_icheck(void *Tree, int Item, int CheckFlag)
  55. {
  56.     aes_intin[0] = Item;
  57.     aes_intin[1] = CheckFlag;
  58.     aes_addrin[0] = (long)Tree;
  59.     aes_control[0] = 31;
  60.     aes_control[1] = 2;
  61.     aes_control[2] = 1;
  62.     aes_control[3] = 1;
  63.     aes_control[4] = 0;
  64.     aes(&aes_params);
  65.     return aes_intout[0];
  66. }
  67.  
  68.  
  69. int menu_ienable(void *Tree, int Item, int EnableFlag)
  70. {
  71.     aes_addrin[0] = (long)Tree;
  72.     aes_intin[0] = Item;
  73.     aes_intin[1] = EnableFlag;
  74.     aes_control[0] = 32;
  75.     aes_control[1] = 2;
  76.     aes_control[2] = 1;
  77.     aes_control[3] = 1;
  78.     aes_control[4] = 0;
  79.     aes(&aes_params);
  80.     return aes_intout[0];
  81. }
  82.  
  83.  
  84. int menu_istart(int me_flag, OBJECT *me_tree, int me_imenu, int me_item)
  85. {
  86.     aes_intin[0] = me_flag;
  87.     aes_intin[1] = me_imenu;
  88.     aes_intin[2] = me_item;
  89.     aes_addrin[0] = (long)me_tree;
  90.     aes_control[0] = 38;
  91.     aes_control[1] = 3;
  92.     aes_control[2] = 1;
  93.     aes_control[3] = 1;
  94.     aes_control[4] = 0;
  95.     aes(&aes_params);
  96.     return aes_intout[0];
  97. }
  98.  
  99.  
  100. int menu_popup(MENU *me_menu, int me_xpos, int me_ypos, MENU *me_mdata)
  101. {
  102.     aes_intin[0] = me_xpos;
  103.     aes_intin[1] = me_ypos;
  104.     aes_addrin[0] = (long)me_menu;
  105.     aes_addrin[1] = (long)me_mdata;
  106.     aes_control[0] = 36;
  107.     aes_control[1] = 2;
  108.     aes_control[2] = 1;
  109.     aes_control[3] = 2;
  110.     aes_control[4] = 0;
  111.     aes(&aes_params);
  112.     return aes_intout[0];
  113. }
  114.  
  115.  
  116. int menu_register(int ApId, char *MenuText)
  117. {
  118.     aes_intin[0] = ApId;
  119.     aes_addrin[0] = (long)MenuText;
  120.     aes_control[0] = 35;
  121.     aes_control[1] = 1;
  122.     aes_control[2] = 1;
  123.     aes_control[3] = 1;
  124.     aes_control[4] = 0;
  125.     aes(&aes_params);
  126.     return aes_intout[0];
  127. }
  128.  
  129.  
  130. int menu_settings(int me_flag, MN_SET *me_values)
  131. {
  132.     aes_intin[0] = me_flag;
  133.     aes_addrin[0] = (long)me_values;
  134.     aes_control[0] = 39;
  135.     aes_control[1] = 1;
  136.     aes_control[2] = 1;
  137.     aes_control[3] = 1;
  138.     aes_control[4] = 0;
  139.     aes(&aes_params);
  140.     return aes_intout[0];
  141. }      
  142.  
  143.  
  144. int menu_text(void *Tree, int Item, char *Text)
  145. {
  146.     aes_addrin[0] = (long)Tree;
  147.     aes_addrin[1] = (long)Text;
  148.     aes_intin[0] = Item;
  149.     aes_control[0] = 34;
  150.     aes_control[1] = 1;
  151.     aes_control[2] = 1;
  152.     aes_control[3] = 2;
  153.     aes_control[4] = 0;
  154.     aes(&aes_params);
  155.     return aes_intout[0];
  156. }
  157.  
  158.  
  159. int menu_tnormal(void *Tree, int Item, int NormalFlag)
  160. {
  161.     aes_addrin[0] = (long)Tree;
  162.     aes_intin[0] = Item;
  163.     aes_intin[1] = NormalFlag;
  164.     aes_control[0] = 33;
  165.     aes_control[1] = 2;
  166.     aes_control[2] = 1;
  167.     aes_control[3] = 1;
  168.     aes_control[4] = 0;
  169.     aes(&aes_params);
  170.     return aes_intout[0];
  171. }
  172.  
  173.  
  174. int menu_unregister(int id)
  175. {
  176.     aes_intin[0] = id;
  177.     aes_control[0] = 36;
  178.     aes_control[1] = 1;
  179.     aes_control[2] = 1;
  180.     aes_control[3] = 0;
  181.     aes_control[4] = 0;
  182.     aes(&aes_params);
  183.     return aes_intout[0];
  184. }
  185.